<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>首页二</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcdn.net/ajax/libs/Base64/0.1.0/base64.min.js"></script>
    <![endif]-->
    <style>
        .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
        .icon {margin-right:10px;color:#1aa094;}
        .icon-blue {color:#1e9fff!important;}
        .layuimini-qiuck-module {text-align:center;margin-top: 10px}
        .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
        .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
        .welcome-module {width:100%;height:210px;}
        .panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
        .panel-body {padding:10px}
        .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
        .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top: .3em;}
        .main_btn > p {height:40px;}
        .layui-bg-number {background-color:#F8F8F8;}
    </style>
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <div class="layui-row layui-col-space15">
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-address-card-o icon icon-blue"></i>用户信息</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10">
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-blue">实时</span>
                                                            <h5>账号</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <b class="no-margins" id="user_id">1234</b>
                                                            <hr class="layui-bg-red">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-cyan">实时</span>
                                                            <h5>代挂数</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <b class="no-margins" id="user_quota">1234</b>
                                                            <hr class="layui-bg-red">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-orange">实时</span>
                                                            <h5>到期时间</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <b class="no-margins" id="user_duedate">1234</b>
                                                            <hr class="layui-bg-red">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" id="pay1" data-title="续时" data-icon="fa fa-window-maximize">
                                                    <i class="fa fa-shopping-cart"></i>
                                                    <cite>续时</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" id="pay2" data-title="代挂数购买" data-icon="fa fa-gears">
                                                    <i class="fa fa-shopping-cart"></i>
                                                    <cite>代挂数购买</cite>
                                                </a>
                                            </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-qq icon icon-blue"></i>Bot信息</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10">
                                        <div class="layui-form" lay-filter="qq_data">
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-blue">MT</span>
                                                            <h5>昵称</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <input type="text" name="name" style="border:#fff;background-color:#F8F8F8;" disabled="true">
                                                            <hr class="layui-bg-blue">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-cyan">MT</span>
                                                            <h5>QQ</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <input type="text" name="qq" style="border:#fff;background-color:#F8F8F8;" disabled="true">
                                                            <hr class="layui-bg-blue">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-orange">MT</span>
                                                            <h5>好友数量</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <input type="text" name="friends" style="border:#fff;background-color:#F8F8F8;" disabled="true">
                                                            <hr class="layui-bg-blue">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-green">MT</span>
                                                            <h5>Q群数量</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <input type="text" name="groups" style="border:#fff;background-color:#F8F8F8;" disabled="true">
                                                            <hr class="layui-bg-blue">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12">
                        <div class="layui-card-header"><i class="fa fa-fire icon"></i>系统信息</div>
                        <div class="layui-form" lay-filter="SystemInfo">
                            <div class="layui-card-body layui-text">
                                <table class="layui-table">
                                    <colgroup>
                                        <col width="100">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                    <tr>
                                        <td>用户名</td>
                                        <td>
                                            <input type="text" name="username" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>计算机名</td>
                                        <td>
                                            <input type="text" name="computername" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>系统名称</td>
                                        <td>
                                            <input type="text" name="os_name" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>系统构架</td>
                                        <td>
                                            <input type="text" name="os_arch" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>系统版本</td>
                                        <td>
                                            <input type="text" name="os_version" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>本地ip</td>
                                        <td>
                                            <input type="text" name="os_ip" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Java版本</td>
                                        <td>
                                            <input type="text" name="java_version" style="border:#fff;background-color:#fff;" disabled="true">
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>
                    <div class="layui-card-body layui-text layadmin-text">
                        <p>作者:漫小猫</p>
                        <p>QQ:2535080855</p>
                        <p>Q群:536321009</p>
                    </div>
                </div>
                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-skyatlas icon icon-tip"></i>天气</div>
                    <div class="layui-card-body layui-text">
                        <iframe scrolling="no" src="https://tianqiapi.com/api.php?style=ts&amp;skin=pitaya" frameborder="0" width="100%" height="100%" allowtransparency="true"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script>
    layui.use(['layer','jquery','form'], function () {
        var $ = layui.jquery,
            form = layui.form
            layer = layui.layer;
        $.ajax({url: '/SelectUserByUsername',
                type: "GET",headers: {"token":localStorage.getItem("token")},async: false,cache: false,
                success: function (data) {
                    $("#user_id").text(data.username);
                    $("#user_quota").text(data.quota);
                    $("#user_duedate").text(data.duedate);
                },error: function (e) {layer.msg("请求错误！");}
        });
        $.ajax({url: '/getBotState/'+localStorage.getItem("bot_qq"),
            type: "GET",headers: {"token":localStorage.getItem("token")},async: false,cache: false,
            success: function (data) {
                form.val('qq_data', data);
            },error: function (e) {layer.msg("Bot未登录！");}
        });
        $.ajax({url: '/getInfo',
            type: "GET",headers: {"token":localStorage.getItem("token")},async: false,cache: false,
            success: function (data) {
                form.val('SystemInfo', data);
            },error: function (e) {layer.msg("请求错误！");}
        });
        $('#pay1').on('click', function () {
            window.parent.location ="/pay/1/"+window.btoa(localStorage.getItem("token"));
        });
        $('#pay2').on('click', function () {
            window.parent.location ="/pay/2/"+window.btoa(localStorage.getItem("token"));
        });
    });
</script>
</body>
</html>
